import React, { Component} from "react";
import { Link } from "react-router-dom";
import "sass/stands/crumbs.scss";

export default class Crumbs extends Component {
  constructor(props) {
    super(props);
  }
  componentDidMount () {
  }
  render () {
    let { crumbsData} = this.props
    
    return (
      <div className="crumbs">
        当前位置：<Link target="_blank" to='/stands/chanpintupu'> 行业智库 </Link> &gt;&nbsp;&nbsp;
        {
          crumbsData.map((item, inde) => {
            if (inde === crumbsData.length - 1) {
              return (<span key={`id_${inde}`}>{item.value}</span>)
            }else{
              return (<em key={`id_${inde}`}><Link target="_blank" to={item.path}>{item.value}</Link> &gt;  </em>)
            }
          })
        }
      </div>
    );
  }
}
